<template>
  <div>
    <h1>关于页,数量{{$store.state.count}}</h1>
    <h1>关于页,总价{{$store.getters.totalPrice}}</h1>
    <button @click="changeEvent">添加数据</button>
  </div>
</template>

<script>
export default {
  mounted(){
    console.log(this.$route)
  },
  methods: {
    changeEvent() {
      // this.$store.commit('setCount')
      this.$store.commit('setCountNum',3)
      console.log(this.$store.state.count)
    }
  }
}
</script>
